<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改用户地址中间')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-userAddress-edit" th:object="${userAddress}">
            <input id="id" name="id" th:field="*{id}"  type="hidden">
			<h4 class="form-header h4"  align="center">地址信息</h4>
			<br/>		
			
			<div class="form-group">	
				<label class="col-sm-2 control-label">姓名：</label>
				<div class="col-sm-3">
					<input id="realname" name="realname" th:field="*{realname}" class="form-control" type="text">
				</div>
				
				<label class="col-sm-2 control-label">性别：</label>
				<div class="col-sm-3">
					<select id="gender" name="gender" class="form-control m-b"
							th:field="*{gender}">
						<option value=""></option>
						<option value=1>女</option>
						<option value=0>男</option>

					</select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-2 control-label">电话号码：</label>
				<div class="col-sm-3">
					<input id="mobile" name="mobile" th:field="*{mobile}" class="form-control" type="text">
				</div>
				
				<label class="col-sm-2 control-label">用户id：</label>
				<div class="col-sm-3">
					<input id="userId" name="userId" th:field="*{userId}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-2 control-label">校区：</label>
				<div class="col-sm-3">
					<input id="school" name="school" th:field="*{school}" class="form-control" type="text">
				</div>
			
				<label class="col-sm-2 control-label">是否默认：</label>
				<div class="col-sm-3">
					<!-- <input id="isdefault" name="isdefault" th:field="*{isdefault}" class="form-control" type="text"> -->
				
				<select id="isdefault" name="isdefault" class="form-control m-b"
						th:field="*{isdefault}">
						<option value=""></option>
						<option value=1>是</option>
						<option value=0>否</option>
						
					</select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-2 control-label">省份：</label>
				<div class="col-sm-3">
					<input id="province" name="province" th:field="*{province}" class="form-control" type="text">
				</div>
			
				<label class="col-sm-2 control-label">城市：</label>
				<div class="col-sm-3">
					<input id="city" name="city" th:field="*{city}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-2 control-label">地区：</label>
				<div class="col-sm-3">
					<input id="area" name="area" th:field="*{area}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-2 control-label">详细地址：</label>
				<div class="col-sm-8">
					<textarea id="address" name="address" th:field="*{address}" class="form-control" ></textarea>
				</div>
			</div>
			
			
			
			
			
			
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "UserAddress/userAddress";
		$("#form-userAddress-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-userAddress-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
